import request from '@/utils/request'

export function getActions(data) {
  return request({
    url: '/action',
    method: 'get',
    data
  })
}

export function addAction(data) {
  return request({
    url: '/action',
    method: 'post',
    data
  })
}

export function getAction(id) {
  return request({
    url: '/action/' + id,
    method: 'get'
  })
}

export function deleteAction(id) {
  return request({
    url: '/api/v1/action/' + id,
    method: 'delete'
  })
}

export function editAction(data) {
  return request({
    url: '/api/v1/action',
    method: 'put',
    data
  })
}
